From: Marco Trevisan (TreviƱo) Date: Wed, 1 May 2024 02:19:34 +0000 (+0200) Subject: shell-tray: Ensure that only a child can be added X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~88^2~9^2^2~25 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=eb937bd17d0bebd2245a4b23f387b6a8d5d6d75f;p=gnome-shell.git shell-tray: Ensure that only a child can be added Part-of: (cherry picked from commit 65fd43703b385aa9cdb3d8cb4e2d5e879613ea92) --- diff --git a/src/shell-tray-icon.c b/src/shell-tray-icon.c index 39204bfe6..9b79c2be0 100644 --- a/src/shell-tray-icon.c +++ b/src/shell-tray-icon.c @@ -239,6 +239,7 @@ shell_tray_icon_set_child (ShellTrayIcon *tray_icon, MetaDisplay *display = shell_global_get_display (shell_global_get ()); g_return_if_fail (tray_icon != NULL); + g_return_if_fail (tray_icon->tray_child == NULL); g_return_if_fail (tray_child != NULL); /* We do all this now rather than computing it on the fly later,